A computer system typically is connected to various peripheral devices, which may include disk drives, tape drives, printers, and modems. The computer system has an operating system that provides an interface between an application program and these devices. The operating system receives from the application program a request to access one of the devices and translates this request to a request that will be understandable by that device. The operating system sends the translated request to the device and typically informs the application program when the request is complete.
The portion of the operating system that translates a request to access a device and controls communications with that device is typically referred to as a device driver. For example, an application program may request the operating system to read a file stored on a disk drive. The operating system would invoke a device driver provided for the disk drive and send the device driver this read request. The disk device driver would translate the read request by determining the actual disk location at which the file is stored, and would send the read request to the disk drive. The disk drive would then service the read request by reading the disk at the determined actual disk location, and then inform the device driver upon completion. The device driver would then inform the application program that the request has been serviced.
FIG. 1 is a block diagram illustrating the use of a device driver in a computer system. The computer system comprises a computer 100 and a plurality of devices 113, 114, 115. The computer 100 includes various application programs 101 and an operating system 102. The application programs 101 request services of the devices through the operating system 102. The operating system 102 receives such a request and invokes an appropriate device driver 103, 104, 105 to service the request. The device driver 103, 104, 105 then translates the request and sends it to the device 113, 114, 115, respectively. It should be noted that, although a device driver can correspond to any number of devices, only one device for each device driver is shown for simplicity of explanation.
Prior device drivers typically have been developed by the manufacturer of each corresponding device. The developer of the operating system typically publishes a specification of the interface between the operating system and a device driver. The manufacturer of the device develops the device driver necessary to communicate with its corresponding device using this specification. After developing the device driver, the manufacturer of the device will often add various features to the device driver to enhance the marketability of the device. For example, a manufacturer of a disk drive may provide a device driver with data compression, data encryption, or disk caching options. Unfortunately, as more options are added to the device driver, the device driver becomes more complex. As the complexity of a device driver increases, the more difficult it becomes for a manufacturer to modify and test the device driver. For example, the addition of data compression, data encryption, or disk caching typically requires changes to be made throughout the device driver code in order to accommodate these options.
An additional problem is that the complexity of distributing device drivers increases when the device manufacturer integrates third party software into its device driver. For example, if a third party develops a particularly efficient data compression program, the third party developer may sell the program to various device manufacturers. Each manufacturer would then integrate the data compression program into its own device driver. Once the integration is complete, each manufacturer would then distribute the new device driver directly to its customers or indirectly through the operating system developer when a new version of the operating system is released.